//
//  ShowMessage.m
//  HandGo_Swift
//
//  Created by 辛宗旭 on 2017/2/11.
//  Copyright © 2017年 辛宗旭. All rights reserved.
//

#import "ShowMessage.h"

@implementation ShowMessage

/**
 数据加载菊花圈
 
 @param messageView <#messageView description#>
 @return <#return value description#>
 */
+ (MBProgressHUD *)showloading:(UIView *)messageView
{
   __weak MBProgressHUD *progressHUD = [MBProgressHUD showHUDAddedTo:messageView animated:YES];
    progressHUD.backgroundColor = [UIColor clearColor];
    progressHUD.square = YES;
    progressHUD.removeFromSuperViewOnHide=YES;
    return progressHUD;
}

/**
 文本提示框
 
 @param message <#message description#>
 @param messageView <#messageView description#>
 @return <#return value description#>
 */
+ (MBProgressHUD *)showOnlyString:(NSString *)message showView:(UIView *)messageView
{
   __weak MBProgressHUD *progressHUD = [MBProgressHUD showHUDAddedTo:messageView animated:YES];
    progressHUD.mode = MBProgressHUDModeText;
    progressHUD.label.text = message;
    progressHUD.margin=10.f;
    progressHUD.backgroundColor = [UIColor clearColor];
    progressHUD.mode = MBProgressHUDModeCustomView;
    progressHUD.removeFromSuperViewOnHide = YES;
    [progressHUD hideAnimated:YES afterDelay:2];
    return progressHUD;
}
/**
 关闭菊花圈
 
 @param showView <#showView description#>
 */
+(void)stopHUD:(UIView *)showView
{
   [MBProgressHUD hideHUDForView:showView animated:YES];
}

@end
